# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        潘炎珍  
# Name:         demo08
# Description:
# Author:       98745
# Date:         2019/3/7
#-------------------------------------------------------------------------------

import re
m=re.search('^The','The end.')
if m is not None:
    print(m.group())
m=re.search('^The','end.The')
print(m)
if m is not None:
    print(m.group())
m=re.search('The$','The end.')
print(m)
if m is not None:
    print(m.group())
m=re.search('The$','end. The')
print(m)
if m is not None:
    print(m.group())

m=re.search(r'\bthis',"what's this")
print(m)
if m is not  None:
    print(m.group())

m=re.search(r'\bthis',"what'sthis")
print(m)
if m is not  None:
    print(m.group())
m=re.search(r'\bthis\b',"what's this?")
print(m)
if m is not  None:
    print(m.group())
m=re.search(r'\bthis\b',"what's thisa")
print(m)
if m is not  None:
    print(m.group())


